package cn.yangliu.nacos.comm.constant;

import java.time.format.DateTimeFormatter;

/**
 * The type of nacos.
 *
 * @author 问道于盲
 * @date 2019 -12-31
 */
public interface GlobalConstants {

    /**
     * current class instance's member.
     * The constant DATE.
     */
    String DATE = "yyyy-MM-dd";

    /**
     * current class instance's member.
     * The constant TIME.
     */
    String TIME = "HH:mm:ss";

    /**
     * current class instance's member.
     * The constant DATETIME.
     */
    String DATETIME = "yyyy-MM-dd HH:mm:ss";

    /**
     * current class instance's member.
     * The constant FORMATTER.
     */
    DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATETIME);

    /**
     * current class instance's member.
     * The constant PASSWORD_REGEXP.
     */
    String PASSWORD_REGEXP = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)" +
            "(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,16}$";

    /**
     * current class instance's member.
     * The constant MOBILE_REGEXP.
     */
    String MOBILE_REGEXP = "^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][0,5,6])|([7][0-8])|" +
            "([8][0-9])|([9][1,8,9]))[0-9]{8}$";

    /**
     * current class instance's member.
     * The constant IP_REGEXP.
     */
    String IP_REGEXP = "[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}";
}
